/*
IM的参数配置对象，为方便使用，采用单例实现；


日期          作者           说明
----------------------------------------
2018-08-29    lcl           源代码 ver 1.0
+
*/

package com.example.tang5.myapplication.im.IMConfiger;

//Configer类，提供IM模块的常用配置变量的读写功能
public class IMConfiger {
    //单例
    private static IMConfiger inst;

    //IM服务端IP和端口
    private String host = "192.168.0.8";
    private int    port = 8021;

    //连接超时时间，毫秒，默认3秒
    private short connectTimeOut        = 3000;
    //断线重连的时间间隔，单位毫秒，默认3秒(app的socket连上服务器也需要一定时间)
    private short reconnectTimeInterval = 3000;
    //网络接收时，数据读取的超时时间，单位毫秒，默认3s
    private short readTimeOut           = 3000;

    //单例
    public static IMConfiger getInstance() {
        if (null == inst) {
            inst = new IMConfiger();
            //todo:初始化各字段
        }
        return inst;
    }

    //服务端IP和端口的属性读写器
    public void setHost(String host){
      this.host = host;
    }

    public String getHost(){
      return this.host;
    }

    public void setPort(int port){
      this.port = port;
    }


    public int getPort(){
      return this.port;
    }

    public void setReconnectTimeInterval(short value){
      this.reconnectTimeInterval = value;
    }

    public short getReconnectTimeInterval(){
      return this.reconnectTimeInterval;
    }

    public void setConnectTimeOut(short value){
      this.connectTimeOut = value;
    }

    public short getConnectTimeOut(){
      return this.connectTimeOut;
    }

    public void setReadTimeOut(short value){
      this.readTimeOut = value;
    }

    public short getReadTimeOut(){
      return this.readTimeOut;
    }





}